zulip: Add remove_storage helper to Client.#916
Conversation
|
It looks like you wrote documentation for this, in zulip/zulip#38786 . Thanks for that! I think a code comment linking to https://zulip.com/api/remove-bot-storage would be helpful here, but (from a quick look) it looks like that's not been our practice in this code. Is @amanagr the right person to confirm that we want to start doing that? |
|
That looks right as being helpful. |
|
Thanks @amanagr! Quick clarification before I update, since
Happy to go either way. |
Thanks! |
Adds `# See https://zulip.com/api/...` references above the update_storage and get_storage helpers. Done in preparation for adding remove_storage, so all three storage helpers carry the same reference.
Mirrors update_storage and get_storage, sending DELETE to
/bot_storage. With no argument, removes all data stored for the
bot; passing {"keys": [...]} removes only the specified entries.
The corresponding endpoint is bot-only as of Zulip 12.0 (API
feature level 494), so this helper only succeeds for bot users.
Fixes zulip#637.
aeb6249 to
1fe5158
Compare
|
@amanagr I have
Let me know if any further changes are required. Thanks! |
|
@amanagr a gentle bump to review the changes I've made. Thank you! |
|
LGTM give it is similar to the other function here and correctly calls the endpoints. |
|
Thanks @hanyucrocks ! Sorry for the delay! |
Mirrors update_storage and get_storage, sending DELETE to /bot_storage. With no argument, removes all data stored for the bot; passing {"keys": [...]} removes only the specified entries.
The corresponding endpoint is bot-only as of Zulip 12.0 (API feature level 494), so this helper only succeeds for bot users.
Fixes #637.
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: